package com.qf.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "tb_user")// select user_name as userNa from tb_user where id = 5
public class User {

    @TableId(type = IdType.AUTO)//主键 策略  自增长
    private Long id;
    //表字段与POJO属性不一致的时候
    @TableField(value = "user_name",select = true)
    private String userNa;
    private String password;
    private String name;
    private Integer age;
    private String email;


    
}